MuleSoft Accelerator for Retail icon

MuleSoft Accelerator for Retail

(0 reviews)

Salesforce CDP setup guide

The following provides guidance on Salesforce CDP setup required for the Deliver relevancy with CDP use case.

CDP provisioning

  1. Log in to your Salesforce CDP instance with the link provided in your admin email and use the credentials provided. If this was deployed in our existing Salesforce instance, please use your current Salesforce Admin password.
  2. Click the Setup gear icon and then CDP Setup.
    • If you don’t see this option, either refresh your page or log out and back in with your admin user credentials.
  3. Click Get Started. Setup can take a few minutes. Your Salesforce CDP instance is considered as successfully set up if you see a green tick mark for all the steps. If not, correct the issue and finish the setup.
rcg-cdp-setup-cdp-provisioning.png

Connect data

Connectors are specialized data streams that communicate with external sources to transmit data into a Salesforce CDP data source object.

Salesforce CDP has connectors for: Marketing Cloud Email Studio, MobileConnect, MobilePush, Marketing Cloud Data Extensions, for Salesforce CRM, Ingestion API, Interaction Studio, and for data outside Salesforce via cloud storage providers.

The Deliver relevancy with CDP use case uses the following connectors:

  • Salesforce CRM - to connect data from Salesforce CRM instance to CDP
  • Ingestion API - to connect data from external source systems like Snowflake and Azure via MuleSoft’s Salesforce CDP connector.

Salesforce CRM Connector

In Salesforce CDP, you can establish a connection to your Salesforce CRM org. Follow the below steps to establish a connection.

  1. In Salesforce CDP, select Setup gear icon and then CDP Setup.
  2. Select Salesforce CRM.
  3. To connect a Salesforce org to Salesforce CDP, click New. You can connect the Salesforce org that has Salesforce CDP provisioned, or you can Connect Another Org (external orgs).
  4. To connect your Salesforce orgs to Salesforce CDP, click Connect. If connecting an external Salesforce org, enter your user credentials to establish the connection with Salesforce CDP.
  5. After you connect your Salesforce org, you can view the connection details.
    • Connector Name: The name of the Salesforce org that is connected to Salesforce CDP.
    • Connector Type: Identifies the name of the data connection type.
    • Status: Shows the org’s status.
    • Org Id: The Salesforce org Id connected to Salesforce CDP.
    • Updated: The date and timestamp of when the Salesforce org was connected to Salesforce CDP.
  6. Your Salesforce org is now connected.

After the connection is established, the Salesforce CDP admin can either use bundles that can automatically deploy data or set up their own data streams.

Ingestion API

You can push data from an external system into Salesforce CDP via the Ingestion API.
This RESTful API offers two interaction patterns: bulk and streaming. The streaming pattern accepts incremental updates to a data set as those changes are captured, while the bulk pattern accepts CSV files in cases where data syncs occur periodically. The same data stream can accept data from the streaming and the bulk interaction.

For the Deliver relevancy with CDP use case, we are pushing data from external systems Snowflake and Azure through MuleSoft’s Salesforce CDP connector into Salesforce CDP via the Ingestion API.

Follow steps in each section below to setup and configure ingestion API to push data from external systems.

Set up an Ingestion API Connector

  1. In Salesforce CDP, select CDP Setup.
  2. Click Ingestion API.
  3. Click New, enter a name for the API source, then click Save. On the details page for the new connector, you must upload a schema file in OpenAPI (OAS) format with the .yaml file extension. The schema file describes how data from your website is structured. Note: Ingestion API schemas have set requirements. Review the schema requirements before ingestion.
  4. Click Upload Schema and navigate to the location of the file you want to use. Select the file and click Open.
  5. Preview all the detected objects and their attributes in your schema.
  6. Click Save. The connector page reflects the updated status.
  7. After the schema file is uploaded, you can create data streams to begin sending data from your source system.

Note: For Deliver relevancy with CDP use case, we have added schema for the following objects.
- Loyalty
- Subscription
- WebEngagement
- EmailEngagement

The schema used for Deliver relevancy with CDP use case can be found in the implementation template.

Schema requirements

To create an ingestion API source in Salesforce CDP, the schema file you upload must meet specific requirements:

  • Uploaded schemas have to be in valid OpenAPI format with a .yml or .yaml extension. OpenAPI version 3 is supported (3.0.0, 3.0.1, 3.0.2).
  • Objects can’t have nested objects.
  • Each schema must have at least one object. Each object must have at least one field.
  • Objects can’t have more than 1000 fields.
  • Objects can’t be longer than 80 characters.
  • Object names must contain only a-z, A-Z, 0-9, _, -. No unicode characters.
  • Field names must contain only a-z, A-Z, 0-9, _, -. No unicode characters.
  • Field names can’t be any of these reserved words: dateid, location_id, dat_account_currency, dat_exchange_rate, pacing_period, pacing_end_date, rowcount, version. Field names can’t contain string .
  • Field names can’t exceed 80 characters.
  • Fields meet the following type and format:
    • For text or boolean type: string
    • For number type: number
    • For date type: string; format: date-string
  • Object names can’t be duplicated; case-insensitive.
  • Objects can’t have duplicate field names; case-insensitive.
  • Date strings in your object payloads must be in ISO 8601 UTC Zulu with formatyyyy-MM-dd'T'HH:mm:ss.SSS'Z.

When updating your schema, be aware:

  • Existing field data types can’t be changed.
  • Upon updating an object, all the existing fields for that object must be present.
  • Your updated schema file only includes changed objects, so you don’t have to provide a comprehensive list of objects each time.
  • A date field must be present for objects that are intended for profile or engagement category. Objects of type other don’t impose this same requirement.

Example Schema: Refer to this link for an example schema.

Create a data stream

Data streams are the connections and associated data ingested into Salesforce CDP. Salesforce CDP includes many data streams that can operate on different refresh schedules. Check Data Stream Schedule in Salesforce CDP to know about how and when these data streams update.

Create a data stream using Salesforce CRM Starter Bundle

Create a data stream using a starter bundle to begin the flow of data from a Salesforce CRM source. Note: You can configure only one starter bundle at a time. For more details on Salesforce CRM Starter Data Bundles, see Salesforce CRM Starter Data Bundles.

For Deliver relevancy with CDP use case, we have created data streams using the Service Cloud starter bundle.
1. Navigate to the Data Streams tab.
2. Click New.
3. Select the Salesforce CRM data source and click Next.
4. Select the Salesforce org from which your data resides. If you have only one org connected to Salesforce CDP, it’s selected by default.
5. The Data Bundles tab is selected by default. Choose a starter bundle (Sales Cloud, Service Cloud, or Loyalty Management). Note: The Loyalty Management bundle is only accessible when object permissions have been set in Salesforce CDP for your Loyalty Management objects.
6. Review the list of Salesforce objects and their fields to be ingested. You can deselect any non required field not necessary for your data stream and click Next.
7. Review the list of objects and their fields and click Next.
8. Review the list of data streams that Salesforce CDP is going to create and click Deploy.
9. Click one of the newly created data streams to review the field list.
10. Click Review Mappings.
11. Review how Data Source Objects are mapped to Data Model Objects.

Create a Salesforce CRM data stream

Create a data stream to begin the flow of data from a Salesforce CRM data source. Add additional permissions to your Salesforce CDP Salesforce Connector Integration permission set in your Salesforce CRM org to ingest standard and custom objects and fields into Salesforce CDP. Note: You if you are prompted with an error stating those objects cannot be added, you might need to Enable Object and Field Permissions to Access Salesforce CRM in Salesforce CDP (see below for further details).

For Deliver relevancy with CDP use case, we have created data streams for Salesforce CRM objects Orders and Products after enabling permissions to ingest data.

To add permissions for objects and their fields:

  1. In the Salesforce org containing the objects and fields you want to ingest into Salesforce CDP, from Setup in the Quick Find box, enter Permission, and select Permission Sets.
  2. Select the Salesforce CDP Salesforce Connector Integration permission set. Note: The permission set is available only after you connect your CRM org to Salesforce CDP.
  3. From Apps, select Object Settings.
  4. Select the object to ingest into Salesforce CDP.
  5. To change object permissions, click Edit.
  6. Enable Read and View All permissions for the object and Read Access for each field.
  7. Click Save.

Repeat these steps for all objects and fields you want to ingest into Salesforce CDP.

To create data streams from Salesforce CRM data source:

  1. In Salesforce CDP, navigate to Data Streams.
  2. Click New.
  3. Select the Salesforce CRM data source and click Next.
  4. To create your data stream, select a Salesforce org.If you have only one Salesforce org connected to Salesforce CDP, it's selected by default.
  5. Select the All Objects tab and click Next.
  6. Review the fields to include in your data stream. All fields are preselected by default. The number of fields available for the object is shown in parentheses.
  7. Deselect any of the fields not required for your data stream in the Header Label.
  8. If needed, add these formula fields and then click Next:
    • Field Label: The display name for a data stream field.
    • Field API Name: The programmatic reference for a data stream field.
    • Formula Return Type: The data type corresponding to the newly derived field. Options include Number, Text, and Date.
  9. Fill in deployment details.
    • Data Stream Name: Defaults to Object Label and Salesforce org ID, but can be edited.
    • Ongoing Refresh Settings: Frequency and timing of new data retrieval. The Frequency is hourly and is set automatically.
  10. Click Deploy. Your Salesforce CRM data stream is now created.
  11. To create more data streams, repeat steps 6 through 10.

Create an Ingestion API data stream

After uploading the schema file, create a data stream from your source objects.

  1. In Salesforce CDP, select Data Streams.
  2. In recently viewed data streams, click New.
  3. Click Ingestion API.
  4. If you’ve more than one Ingestion API configured, select the one you want from the dropdown.
  5. Check the objects found in the schema you want to use and click Next.
  6. At the New Data Stream dialog box, configure the following:
    • Primary Key Note: A true Primary Key needs to be leveraged for CDP. If one does not exist, you will need to create Fromula Filed for the Primay Key.
    • Category: Choose between Profile and Engagement. Note: For Deliver relevancy with CDP use case, the category for all the objects in the schema are Profile.
    • Record Modified Date: To order Profile modifications, use the Record Modified Date. Note: A record modified field that indicates when each incoming record was last modified is required for Engagement object types. While the field requirement is optional for Profile and Other objects, we encourage you to provide the record modified field to ensure incoming records are processed in the right order.
    • Date Time Field: Used to represent when Engagement from an external source occurred at ingestion.
  7. Click Next.
  8. On the final summary screen, review the list of data streams that Salesforce CDP created.
  9. Click Deploy. If you’ve only created one data stream, the data stream’s record page appears. If you’ve created multiple data streams, the view refreshes to show all recently viewed data streams.
  10. Map the data for the data stream before use. Wait up to one hour for your data to appear in your data stream.

Create a Connected App for Salesforce CDP Ingestion API

Before you can send data into Salesforce CDP using Ingestion API via Mulesoft’s Salesforce CDP connector, you must configure a Connected App. Refer this link for more details on creating a connected app.

As part of your Connected App set up for Ingestion API, you must select the following OAuth scope:
- Access and manage your Salesforce CDP Ingestion API data (cdp_ingest_api)
- Manage Salesforce CDP profile data (cdp_profile_api)
- Perform ANSI SQL queries on Salesforce CDP data (cdp_query_api)
- Manage user data via APIs (api)
- Perform requests on your behalf at any time (refresh_token, offline_access).

Configure Mulesoft’s Salesforce CDP Connector

Anypoint Connector for Salesforce CDP (Salesforce CDP Connector) provides customers a pipeline to send data into Salesforce CDP.

This connector works with the Salesforce CDP Bulk and Streaming API, depending on the operation you configure. Each API call uses a request/response pattern over an HTTPS connection. All required request headers, error handling, and HTTPS connection configurations are built into the connector.

Refer to this link for details on configuration and operations for Salesforce CDP Connector.

For Deliver relevancy with CDP use case, refer CDP System API specification and implementation template.

Data modeling and data mapping

Data cleansing and preparation

Cleaning and preparing your data is critical for success in using Salesforce CDP’ segmentation and activation capabilities.

Data mapping

After creating your data streams, you must associate your data source objects (DSOs) to data model objects (DMOs). Only mapped fields and objects with relationships can be used for Segmentation and Activation.

On the Data Stream detail page or after deploying your data streams, click Start Data Mapping.

On the Data Streams mapping canvas, you can see both your DSOs and target DMOs. To map one to another, click the name of a DSO and connect it to the desired DMO. For example, you can map the DSO firstname to the target First Name field using this method.

  • Data Mapper Views
    Select table view or visual view when mapping your data in Salesforce CDP.
  • Data Model Objects
    Objects in the data model created by the customer for CDP implementation are called Data Model Objects. If a new object is created, it can use a reference object. If a Data Model Object uses a reference object, it inherits the name, shape, and semantics of the reference object. This Data Model Object is called a Standard Object. You can also choose to define an entirely custom Data Model Object, called a Custom Object.
  • Required Data Mappings
    When mapping your party area data, complete the required fields and relationships to successfully use Identity Resolution, Segmentation, and Activation.

For the Deliver relevancy with CDP use case, we mapped to Custom DMO for our MuleSoft Web Engagement Data.

Data Mapping

rcg-cdp-setup-custom-dmo-webengagement.png

Data Relationships

rcg-cdp-setup-webengagement-data-relationships.png

Identity Resolution

Use Identity Resolution to match and reconcile data about people into a comprehensive view of your customer called a unified profile. Identity Resolution uses matching and reconciliation rulesets to link the most relevant data from all the associated profiles of each unified profile. Identity Resolution is powered by rulesets to create unified profiles in Salesforce CDP.

Access Identity Resolution from Salesforce CDP after mapping entities to the CIM. Entities must be mapped before you can create rulesets. Additional Information can be found here.

For the Deliver relevancy with CDP use case, we are leveraging the Fuzzy Name and Normalized Email Match Rule; leveraging Fuzzy First Name, Exact Last Name, and Normalized Email Address.

rcg-cdp-setup-identity-match-rules.png

rcg-cdp-setup-identity-match-rules-criteria.png

To create your Identity Resolution Rules, follow the steps below:

  1. Go to the Identity Resolution Tab in the main Menu.
  2. Click New in the upper right corner.
  3. Select Individual from the drop-down for the Entity. Do not add a Ruleset ID for your Primary Ruleset.
  4. Create a Ruleset Name. If you are using more than one Ruleset for testing, having the name reference the rules included will help differentiate the rulesets.
  5. Add a Rule Description (optional).
  6. Click Save to save the ruleset.
  7. Click the Configure button to configure your Match Rules.
  8. Click the Configure button nest to Match Rule 1 to configure your Match Rules.
  9. Add the desired Match Rules.
  10. Click the Next button and dd the desired criteria for you Match Rules.
  11. Click the Next button. Click Add Match Rule to add any additional rules or click Save to complete Match Rules.

Once run, review the Identity Resolution Summary and Processing History Screens to validation your Identity Resolution Rules.

Add applicable Individual Reconciliation Rules

Create and activate segments

Segmentation

Creating segments is simple in CDP.

  1. In Salesforce CDP, click Segments.
  2. When you see the list of already created segments, if any, click New.
  3. Fill in all desired fields under Segment Details. Segment On, Segment Name, and Publish Schedule are required.
    • Segment On: Identifies the entity that your segment builds on.
    • Segment Name: Give your Segment a unique name that’s easy to remember and recognize.
    • Segment Description: Provide detail about a segment’s use, contents, or timeframes for later review.
    • Publish Schedule: Determines when and how often your segment publishes to activation targets.
  4. Save your changes.

Tip: Leave the Publish Schedule as Don’t Refresh for now, and then fill it in after you complete your segment filters. Segment can be scheduled to publish every 12 or 24 hours.

Segment On: Segment On defines the target entity (object) used to build your segment. For example, you can build a segment on Unified Individual or Account. You can choose any entity marked as type Profile during ingestion.

For the Deliver relevancy with CDP use case, we have created a few Segments. All Segments that we have created have been segmented on Unified Individual. For this segment, we wanted to create an audience wherein there were no Web Page Views in the last 365 Days. We grabbed updated Date from our Attribute Library and dragged it over the the canvas. And for the operator we selected ‘Greater Than Last Number of Days’ and keyed in 365 for the number of days. And for the Publish Schedule we updated it to reflect a Publish Schedule of every 24 hours.

rcg-cdp-setup-segment-nowebpageviews.png

Activation Targets

Create activation targets, build, and activate data segments with Salesforce CDP.

For Deliver relevancy with CDP use case, we have created Cloud File Storage (S3) Activation Target and Marketing Cloud Activation Target.

Activation Target - Cloud File Storage (S3):

Create an activation target in Salesforce CDP to publish segments to Cloud Storage. You can activate S3 without mapping contact points. Before you can create an Activation Target, determine your S3 access key and secret key.

  1. Click Activation Targets.
  2. Click New Activation Target.
  3. Select Cloud File Storage.
  4. Click Next.
  5. Enter an easy to recognize and unique name.
  6. Click Next.
  7. Type the S3 bucket and parent folder configured by your admin for your activation target.
  8. To give access to your S3 location, enter your S3 access key and secret key. The S3 credentials provided must have the following permissions: s3:PutObject, s3:GetObject, s3:ListBucket, s3:DeleteObject, s3:GetBucketLocation. NOTE: To delete S3 access or secret keys, delete the activation target.
  9. Select an export file format.
  10. Click Save.

Your Cloud File Storage activation target is created and items are added to Cloud Storage.

  1. A metadata file that describes the segment definition.
  2. Data files that contain the segment members with additional attributes.
  3. A segment-data folder to indicate that writing output files to the folder has completed. If this file is missing, it indicates that either the files are being written or the data was only partially written and the producer failed.

After you create and activate segments to Cloud File Storage, a subfolder called Salesforce-c360-Segments is automatically created when the first segment is activated to Cloud File Storage.

  1. Access Cloud File Storage.
  2. Navigate to the bucket name you configured in Cloud File Storage Activation Target.
  3. Navigate to /firstparty/Salesforce_c360_Segments.Segments are created in YYYY/MM/DD/HH/{first 100 characters of segment name}{20 characters of activation name}_{timestamp in yyyyMMddHHmmsssSSS format}.

Activation Target - Marketing Cloud:

Before creating an activation target, configure the Marketing Cloud connector in the CDP Setup page.

  1. Click Setup gear icon and then CDP Setup.
  2. Select Marketing Cloud.
  3. Enter Credentials to authenticate your Marketing Cloud account. You can proceed with the next step in the setup only if the authentication is successful.
  4. Data Source setup - this step is optional. This needs to be set up if you are planning to ingest data from Marketing Cloud into Salesforce CDP. Note: For Deliver relevancy with CDP use case, this step is skipped.
  5. Select Business Units to activate - this step is optional. To add or remove business units (BU), click the arrows between the two columns. Note: For Deliver relevancy with CDP use case, we have selected business units to publish segments to Marketing Cloud.

Create an activation target in Salesforce CDP to publish segments to Marketing Cloud business units.

  1. Click Activation Targets.
  2. Click New.
  3. Select Marketing Cloud.
  4. Click Next.
  5. Enter an easy to recognize and unique name. IMPORTANT: Marketing Cloud activation target names can’t be more than 128 characters, start with an underscore, be all numbers, or include these characters: @ %^ = < ' * + # $ / \ ! ? ( ) { } [ ] , . \ \
  6. Click Next.
  7. To add or remove business units (BU) to receive the published segments, click the arrows between the two columns.When an activation target has multiple BUs, the activation filters the contacts by the BUs. The segment activates as a Shared Data Extension (SDE) and not as a Data Extension (DE) to Marketing Cloud. If an activation target has multiple business units configured, modify the activation target configuration to include one business unit only.
  8. Save your changes.

Your Marketing Cloud activation target is created.

Activation

Activation is the process that materializes and publishes a segment to activation platforms. An activation target is used to store authentication and authorization information for a given activation platform. You can publish your segments, include contact points, and additional attributes to the activation targets.

View, change, and delete your Activations in Salesforce CDP for publishing of segments to activation platforms. Navigate to an Activation record to view details and publish history for that Activation.

In Activations, the Activation History shows when and how segments were published. For segments published to a Marketing Cloud activation target, additional Accepted and Rejected columns only appear in Activation Publish History to provide more details.

To view the publish history of a segment:

  1. In Salesforce CDP, navigate to your Activations.
  2. Select the activation to review.
  3. View details in Activation History.

To create Activation for a Segment:

After you create a segment in Salesforce CDP, you can publish a segment to an activation target.

  1. In Salesforce CDP, click Segments.
  2. Select a segment.
  3. In Activations, click New.
  4. Select an Activation Target.
  5. Select an entity from Activation Membership.
  6. Click Next.
  7. Select your contact points. Note: Selecting contact points is optional for S3 activations.
    1. When contact points are mapped, select an existing path or click Edit to add, reorder, or delete sources and change source types and priority for each contact point. Source Type Marketing Cloud is selected by default.
    2. For Marketing Cloud Activations, modify activations so that the source priority order is Marketing Cloud, and remove Any Source and Any Type, so new contacts won’t get introduced to Marketing Cloud from other sources.If an activation source priority has Any Source and Any Type configured, the activation will introduce contacts from other business units into the business unit configured for the activation target. If an activation source priority has other sources configured, activation introduces new contacts in Marketing Cloud.
  8. To activate additional attributes, click Add Attributes.
    1. Drag up to 100 additional attributes to the canvas and click Save. Note: Two types of additional attributes can be added to your activation:
      1. Attributes of the Activation Membership entity.
      2. Attributes from entities mapped with a direct relationship to the Activation Membership entity.
    2. Click to add a unique preferred attribute name for any attributes.
  9. Click Next.
  10. Enter a name and description for your activation. IMPORTANT: You can’t include the following characters in the name field: + ! @ # $ % ^ * ( ) = { } [ ] \ . < > / " : ? | , _ &
  11. Click Save.

Your segment publishes on the next publish scheduled for the selected activation target.

Calculated Insights

The Calculated Insights feature lets you define and calculate multi-dimensional metrics from your entire digital state stored in Salesforce CDP.

Calculated Insights can be built Using Calculated Insights Builder, ANSI SQL, Salesforce Package, or Streaming Insights. Details on all options and use cases can be found in the CDP Help Documentation. Also check Processing Calculated Insights for the Calculated Insights schedule.

For the Deliver relevancy with CDP use case, we created Calculated Insights to gain visibility across our Loyalty and Sales Order data. Examples of Calculated Insights are available in our CDP Help Documentation and in our CDP Salesforce GitHub Instance.

Once created, Calculated Insights are available in the Attribute Library. You can also confirm and validate Calculated Insights via Data Explorer.

rcg-cdp-setup-calculated-insights.png

Reviews

TypeCustom
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onJun 1, 2022
Contact nameMuleSoft Solutions
Contact emailsolutions-questions@mulesoft.com
Asset overview

Asset versions for 2.6.x

Asset versions
VersionActions
2.6.0

Categories

Accelerator
RetailNo values left to add
Industry Vertical
RetailNo values left to add

Tags